package com.example.demo.mapper;

import com.example.demo.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


@Mapper
public interface UserMapper {

    int register(UserInfo userInfo);

    @Select("select * from userinfo where username = #{username}")
    UserInfo selectByUsername(@Param("username") String username);

    @Select("select * from userinfo where id = #{uid}")
    UserInfo getUserByUid(@Param("uid") int uid);
}
